
const fs = window.require("fs");

const load = filename => {
    let r = [],
        q = window.require("querystring"),
        f = fs.readFileSync(filename, "ascii"),
        // f = fs.readFileSync(filename, "utf-8"),
        v = q.parse(f, '[', ']'),
        t;
    for (let i in v) {
        if (i != '' && v[i] != '') {
            r[i] = [];
            t = q.parse(v[i], '\n', '=');
            for (let j in t) {
                if (j != '' && t[j] != '') r[i][j] = t[j];

            }
        }
    }
    return r;
};  

export default load;